home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nejlepší hry
/
Nejlepsi hry.iso
/
hry
/
sea of chaos
/
sea_install.msi
/
_15C39AAA7726369D39812BD40F01CF6A
/
_C99DAB89EA9740528623AD85231E3485
< prev
next >
Wrap
Text File
|
2004-11-23
|
614b
|
31 lines
//shader to clip any pixels with a Z coordinate below the water plane
//modulates color from vertex with texture sample
//must be used with clipZ_lit.vsh
//Luke Lenhart
//(C)2004-2005 Digipen Institute of Technology
//base texture
sampler2D sampTex;
//shader input
struct PS_INPUT
{
float4 Pos : TEXCOORD1;
float2 Tex0 : TEXCOORD0;
float4 Color : COLOR;
};
//shader
float4 PShader(PS_INPUT In) : COLOR
{
//cut out pixel if it's below z=0
clip(In.Pos.z);
//sample texture and scale by color
float4 clr=tex2D(sampTex,In.Tex0);
clr*=In.Color;
//
return clr;
};